/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState: {
  currentAccount?: API.ModelsAccount | undefined;
}) {
  const { currentAccount } = initialState || {};
  return {
    canAdmin:
      currentAccount !== undefined &&
      currentAccount.id &&
      currentAccount.id > 0,
  };
}
